package com.ztgf.order.api.client;

import com.ztgf.common.constant.Result;
import com.ztgf.order.models.bo.LogisticsEditBO;
import com.ztgf.order.models.bo.OrderShipSaveBO;
import com.ztgf.order.models.service.IOrderShipService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 订单发货表控制器
 *
 * @author chenyu.wang
 * @Date 2020-06-29 11:26:15
 */

@RestController
@RequestMapping("/api/orderShip")
@Slf4j
@Api(value = "OrderShipApiController", tags = "订单发货表Api接口")
public class OrderShipApiController {

    @DubboReference
    private IOrderShipService orderShipService;

    @PostMapping(value = "/addOrderShip")
    @ApiOperation(value = "订单发货接口", notes = "订单发货接口")
    public Result addOrderShip(OrderShipSaveBO shipSaveBO) {
        return orderShipService.addOrderShip(shipSaveBO);

    }

    @PostMapping(value = "/updateLogistics")
    @ApiOperation(value = "修改物流信息（重新发货）", notes = "修改物流信息（重新发货）")
    public Result updateLogistics(LogisticsEditBO saveBO) {
        return orderShipService.updateLogistics(saveBO);
    }
}
